package com.lxmes.base.mapper;

import java.util.List;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.lxmes.base.domain.JcIteminfo;
import org.apache.ibatis.annotations.Param;

/**
 * 物料信息Mapper接口
 *
 * @author ruoyi
 * @date 2022-06-11
 */
public interface JcIteminfoMapper
{
    /**
     * 查询物料信息
     *
     * @param id 物料信息主键
     * @return 物料信息
     */
    public JcIteminfo selectJcIteminfoById(Long id);
    public JcIteminfo selectJcIteminfoByItemCode(String itemCode);
    public JcIteminfo selectJcIteminfoByItemId(String itemId);
    public JcIteminfo selectJcIteminfoByItemIdAndClassIdAndIdentifyCode(@Param(value = "itemId") String itemId, @Param(value = "classId")String classId,@Param(value = "itemIdentifyCode")String itemIdentifyCode);
    public List<JcIteminfo> selectJcIteminfoByIdentifyCode(String identifyCode);
    public JcIteminfo selectJcIteminfoByIdentifyCode2(JcIteminfo jcIteminfo);
    //根据物料条码号获取物料信息
    public JcIteminfo selectJcIteminfoByTmh(String tmh);
    /**
     * 查询物料信息列表
     *
     * @param jcIteminfo 物料信息
     * @return 物料信息集合
     */
    public List<JcIteminfo> selectJcIteminfoList(JcIteminfo jcIteminfo);
    public List<JcIteminfo> selecIteminfoByIds(Long [] ids);

  public JcIteminfo selectJcIteminfo(JcIteminfo jcIteminfo);

    /**
     * 新增物料信息
     *
     * @param jcIteminfo 物料信息
     * @return 结果
     */
    public int insertJcIteminfo(JcIteminfo jcIteminfo);

    /**
     * 修改物料信息
     *
     * @param jcIteminfo 物料信息
     * @return 结果
     */
    public int updateJcIteminfo(JcIteminfo jcIteminfo);
    public int updateSimpleCodeByItemIdentifyCode(@Param("lineSimpleCode") String lineSimpleCode, @Param("itemIdentifyCode")String itemIdentifyCode, @Param("classId")String classId);

    /**
     * 删除物料信息
     *
     * @param id 物料信息主键
     * @return 结果
     */
    public int deleteJcIteminfoById(Long id);
    public int deleteJcIteminfoByItemCode(String itemCode);
    public int deleteJcIteminfoByItemIdentifyCode(String itemIdentifyCode);
    @InterceptorIgnore(blockAttack = "true")
    public int delAllItemInfo();

    /**
     * 批量删除物料信息
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteJcIteminfoByIds(Long[] ids);

    int updateJcIteminfoByCode(JcIteminfo iteminfo);

    List<JcIteminfo> mobileWarehouserecordList(JcIteminfo jcIteminfo);
    List<JcIteminfo> getItemAllCode();
}
